package com.GGG.cloud.house.web;

import com.GGG.cloud.house.domain.vo.AgencyVo;
import com.GGG.cloud.house.domain.vo.AgentVo;
import com.GGG.cloud.house.domain.vo.HouseVo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 李卓
 * @version 1.0
 * @desc
 * @date 2020/9/29  15:07
 * @copy 老九学堂
 * @address 四川.成都西部国际金融中心
 */
@Controller
public class AgencyController {
    @RequestMapping("agencies.html")
    public String agencies(ModelMap modelMap){
        modelMap.put("title","房产系统-房产代理商");
        modelMap.put("desc","找房子，好房子");
        List<AgencyVo> agencyVos = new ArrayList<>();
        agencyVos.add(new AgencyVo("assets/images/agencies/agency-1.jpg","Royao Estates","4","6"));
        agencyVos.add(new AgencyVo("assets/images/agencies/agency-2.jpg","Luzury Homes","5","6"));
        agencyVos.add(new AgencyVo("assets/images/agencies/agency-3.jpg","Duplex Estates","4","6"));
        agencyVos.add(new AgencyVo("assets/images/agencies/agency-4.jpg","Global Homes","5","5"));
        agencyVos.add(new AgencyVo("assets/images/agencies/agency-5.jpg","Green House Homes","4","7"));
        agencyVos.add(new AgencyVo("assets/images/agencies/agency-6.jpg","Landscape Estates","3","6"));
        modelMap.put("agencyList",agencyVos);
        return "agencies";
    }

    @RequestMapping("agency-details.html")
    public String agencyDetails(ModelMap modelMap){
        modelMap.put("title","房产系统-房产代理商详情");
        modelMap.put("desc","找房子，好房子");
        List<AgentVo> agentVos = new ArrayList<>();
        agentVos.add(new AgentVo("assets/images/agent/agent-1.jpg","唐纳德.菲尔","(756) 447 5779","info@example.com","5"));
        agentVos.add(new AgentVo("assets/images/agent/agent-2.jpg","朱.汉密尔顿","(756) 447 5779","info@example.com","2"));
        agentVos.add(new AgentVo("assets/images/agent/agent-3.jpg","克莉期丁.吉尔波特","(756) 447 5779","info@example.com","4"));
        agentVos.add(new AgentVo("assets/images/agent/agent-4.jpg","杰森.帕特","(756) 447 5779","info@example.com","2"));
        modelMap.put("agentList",agentVos);

        List<HouseVo> houseVos = new ArrayList<>();
        houseVos.add(new HouseVo("assets/images/property/property-1.jpg","550",6,4,3,"江南宅院","锦江区东大街下东大街568号","550","出租"));
        houseVos.add(new HouseVo("assets/images/property/property-2.jpg","550",6,4,3,"木马山别墅","城北大道450附22号","2550","出售"));
        houseVos.add(new HouseVo("assets/images/property/property-3.jpg","550",6,4,3,"皇家一号公寓","锦江区福字街215号","550","出租"));
        houseVos.add(new HouseVo("assets/images/property/property-4.jpg","550",6,4,3,"龙城一号别墅","龙泉驿区南山大道333号附12号","550","出租"));
        houseVos.add(new HouseVo("assets/images/property/property-5.jpg","550",6,4,3,"春天花园别墅","金牛区琴台西路668号","2550","出售"));
        houseVos.add(new HouseVo("assets/images/property/property-6.jpg","550",6,4,3,"万科西山别墅","高新区蜀都大道12号","550","出租"));
        modelMap.put("houseList",houseVos);
        return "agency-details";
    }
}
